home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / commercial / inovatronics / candodemo / helpfiles / dos&file control  < prev    next >
Text File  |  1994-11-17  |  8KB  |  357 lines

  1. F- AskForFileName        |askforfilename|
  2. C- Close                |close|
  3. C- Dos                    |dos|
  4. C- Echo                    |echo|
  5. F- Exists                |exists|
  6. F- FileOf                |fileof|
  7. C- FileReadChars        |filereadchars|
  8. C- FileReadLine            |filereadline|
  9. F- FileSize                |filesize|
  10. F- FileType                |filetype|
  11. C- FileWriteChars        |filewritechars|
  12. C- FileWriteLine        |filewriteline|
  13. C- GetDiskInfo            |getdiskinfo|
  14. C- GetFileInfo            |getfileinfo|
  15. C- InsertDeviceList        |insertdevicelist|
  16. C- InsertDirectoryList    |insertdirectorylist|
  17. C- OpenFile                |openfile|
  18. F- ParentOf                |parentof|
  19. F- PathAndFile            |pathandfile|
  20. F- PathOf                |pathof|
  21. C- SetCurrentDirectory    |setcurrentdirectory|
  22. C- SetFileBufferSize    |setfilebuffersize|
  23. C- SetStandardOut        |setstandardout|
  24. C- SetSystemRequesterTo    |setsystemrequesterto|
  25. V- TheCurrentDirectory    |thecurrentdirectory|
  26. V- TheOriginDirectory    |theorigindirectory|
  27. [E]
  28.  
  29. |askforfilename|
  30. WT {FilePath}=AskForFileName({InitialFilePath} [,{WindowTitle} [,{XCoor}, {YCoor}]])
  31. PL Brings up CanDo's file requester, allowing
  32. PL your application to ask user's for a file
  33. PL name which they can locate.  The default
  34. PL file name must be specified, with an
  35. PL optional window title, and positioning.
  36. ED
  37.  
  38. |close|
  39. WT Close {BufferName}
  40. PT Functionally the same as the 
  41. BS Flush
  42. PT  command.
  43. ED
  44.  
  45. |dos|
  46. WT Dos {DOS command line} [,<STDOUT>]
  47. PL Executes the string specified in "DOS
  48. PL Command" as an AmigaDOS command.  It works
  49. PL as though the command were typed from a CLI
  50. PL Window.  The STDOUT flag tells the Dos
  51. PL command to use the current CLI or Shell for
  52. PL its output.
  53. ED
  54.  
  55. |echo|
  56. WT Echo [{String} [,<NOLINE>]]
  57. PL This simply echo out some stuff to the
  58. PL console if there is one.
  59. PL
  60. PT SEE ALSO: 
  61. BS SetStandardOut
  62. PT .
  63. ED
  64.  
  65. |exists|
  66. WT {Logical}=Exists({FilePath})
  67. PL This returns TRUE if the specified filepath
  68. PL exists.
  69. ED
  70.  
  71. |fileof|
  72. WT {FileName}=FileOf({FilePath})
  73. PL Extracts the filename from a complete file
  74. PL path specification.  For example:
  75. PL   Let MyFileName = FileOf("DF0:Tools/Test")
  76. PL MyFileName will equal "Test".
  77. PL
  78. PT SEE ALSO: 
  79. BS PathOf
  80. PT .
  81. ED
  82.  
  83. |filereadchars|
  84. WT FileReadChars {FileReadBufferName}, <VarName>, {Count} [,<HEX>]
  85. PL Reads in {Count} characters from the file
  86. PL associated with the buffer specified.  The
  87. PL characters read in are put into the given
  88. PL variable.  See next page for HEX info.
  89. PL
  90. NP filereadchars2
  91. PT SEE ALSO: 
  92. BS FileReadLine
  93. PT  and 
  94. BS FileWriteChars
  95. PT .
  96. ED
  97.  
  98. |filereadchars2|
  99. WT FileReadChars {FileReadBufferName}, <VarName>, {Count} [,<HEX>]
  100. PL If the HEX flag is given then the incomming
  101. PL characters are converted into a hex string.
  102. PT You can use the 
  103. BS HexToChars
  104. PT , 
  105. BS CharsToHex
  106. PL ,
  107. BS HexToInteger
  108. PT  and 
  109. BS IntegerToHex
  110. PL  functions to
  111. PL manipulate this string.
  112. PT SEE ALSO: 
  113. BS FileWriteChars
  114. PT .
  115. PP filereadchars
  116. ED
  117.  
  118. |filereadline|
  119. WT FileReadLine {FileReadBufferName}, <VarName>
  120. PL Reads a line from the file associated with
  121. PL the buffer specified.  The line read in are
  122. PL put into the given variable.
  123. PL
  124. PT SEE ALSO: 
  125. BS FileReadChars
  126. PT  and 
  127. BS FileWriteLine
  128. PT .
  129. ED
  130.  
  131. |filesize|
  132. WT {Integer}=FileSize({FilePath})
  133. PL Returns the size, in bytes, of the
  134. PL specified file.
  135. PL
  136. PT SEE ALSO: 
  137. BS GetFileInfo
  138. PT .
  139. ED
  140.  
  141. |filetype|
  142. WT {String}=FileType({FilePath})
  143. PL This will try to figure out the file type
  144. PL of the specifed file.  If the file type is
  145. PL not known then this function will return
  146. PL the string "Unknown".
  147. PL
  148. PT SEE ALSO: 
  149. BS GetFileInfo
  150. PT .
  151. ED
  152.  
  153. |filewritechars|
  154. WT FileWriteChars {FileWriteBufferName}, {String} [,{Count} [,<HEX>]
  155. PL Writes the string to the file associated
  156. PL with the buffer specified.  If a count is
  157. PL given then only that many characters will
  158. PL be written.  See next page for HEX info.
  159. PL
  160. NP filewritechars2
  161. PT SEE ALSO: 
  162. BS FileWriteLine
  163. PT  and 
  164. BS FileReadChars
  165. PT .
  166. ED
  167.  
  168. |filewritechars2|
  169. WT FileWriteChars {FileWriteBufferName}, {String} [,{Count} [,<HEX>]]
  170. PL If the HEX flag is given then the outgoing
  171. PL string is assummed to be a hex string and
  172. PL will be converted back into raw binary data.
  173. PL
  174. PT SEE ALSO: 
  175. BS FileReadChars
  176. PT .
  177. PP filewritechars
  178. ED
  179.  
  180. |filewriteline|
  181. WT FileWriteLine {FileWriteBufferName}, {String}
  182. PL Writes the given string to the file
  183. PL associated with the buffer specified.
  184. PL This command will write a newline character
  185. PL after writing the given string.
  186. PL
  187. PT SEE ALSO: 
  188. BS FileWriteChars
  189. PT  and 
  190. BS FileReadLine
  191. PT .
  192. ED
  193.  
  194. |getdiskinfo|
  195. WT GetDiskInfo {FilePath}, <NumberOfBlocksVar> [,<NumberUsedVar> [,<BytesPerBlockVar>]]
  196. PL This command will allow you to retrieve
  197. PL information about the specified disk.
  198. PL See the manual for a full description
  199. PL of this command.
  200. PL
  201. PT SEE ALSO: 
  202. BS GetFileInfo
  203. PT .
  204. ED
  205.  
  206. |getfileinfo|
  207. WT GetFileInfo {FilePath}, <SizeInBytesVar> [,<NumberOfBlocksVar> [,<AttributesVar> [,<DateVar> [,<TimeVar> [,<CommentVar>]]]]]
  208. PL This command will allow you to retrieve info
  209. PL about the specified file or directory.  See
  210. PL the manual for a full description of this
  211. PL command.
  212. PT SEE ALSO: 
  213. BS GetDiskInfo
  214. PT , 
  215. BS FileType
  216. PL  and
  217. PT           
  218. BS FileSize
  219. PT .
  220. ED
  221.  
  222. |insertdevicelist|
  223. WT InsertDeviceList [<flags>]
  224. PL Types the list of Devices into the current
  225. PL document.  See the manual for a full
  226. PL description of this command.
  227. ED
  228.  
  229. |insertdirectorylist|
  230. WT InsertDirectoryList [<flags>]
  231. PL Types the current directory's list of files
  232. PL and/or directories into the current
  233. PL document.  See the manual for a full
  234. PL description of this command.
  235. ED
  236.  
  237. |openfile|
  238. WT OpenFile {FilePath}, {FileIOBufferName}, <IOflags>, <AccessFlags>
  239. PL Opens a file for input/output purposes.
  240. PL You can have as many files open as memory
  241. PL permits.  See the manual for a full
  242. PL description of this command.
  243. PT SEE ALSO: 
  244. BS FileWriteLine
  245. PT , 
  246. BS FileWriteChars
  247. PL ,
  248. PT       
  249. BS FileReadLine
  250. PT , 
  251. BS FileReadChars
  252. PT  and 
  253. BS Close
  254. PT .
  255. ED
  256.  
  257. |parentof|
  258. WT {PathName}=ParentOf({PathName})
  259. PL This returns the parent directory to the
  260. PL directory pathname given.
  261. PL
  262. PT SEE ALSO: 
  263. BS PathOf
  264. PT .
  265. ED
  266.  
  267. |pathandfile|
  268. WT {FilePath}=PathAndFile({PathName}, {FileName})
  269. PL This combines and returns the pathname and
  270. PL filename given.
  271. PL
  272. PT SEE ALSO: 
  273. BS PathOf
  274. PT  and 
  275. BS FileOf
  276. PT .
  277. ED
  278.  
  279. |pathof|
  280. WT {PathName}=PathOf({FilePath})
  281. PL Extracts the pathname from a complete file
  282. PL path specification.  For example:
  283. PL   Let MyPathName = PathOf("DF0:Tools/Test")
  284. PL MyFileName will equal "DF0:Tools/".
  285. PL
  286. PT SEE ALSO: 
  287. BS FileOf
  288. PT  and 
  289. BS ParentOf
  290. PT .
  291. ED
  292.  
  293. |setcurrentdirectory|
  294. WT SetCurrentDirectory {PathName}
  295. PL This set the decks current directory.
  296. PL See the manual for a full description
  297. PL of this command.
  298. ED
  299.  
  300. |setfilebuffersize|
  301. WT SetFileBufferSize {KiloBytes}
  302. PL Sets the file input/output buffer size in
  303. PL kilobytes.  The default is 4 Kilobytes.
  304. PL It only applies to buffers opened after 
  305. PL this command is used.
  306. PL
  307. PT SEE ALSO: 
  308. BS OpenFile
  309. PT .
  310. ED
  311.  
  312. |setstandardout|
  313. WT SetStandardOut {FileWriteBufferName}
  314. PT Redirects the output of the 
  315. BS Echo
  316. PL  command
  317. PL to a file.  The buffer must first be opened
  318. PT with the 
  319. BS OpenFile
  320. PL  command.
  321. ED
  322.  
  323. |setsystemrequesterto|
  324. WT SetSystemRequesterTo <WINDOW | WORKBENCH | NOWHERE>
  325. PL This redirects dos autorequesters to the
  326. PL current WINDOW's screen, WORKBENCH (default)
  327. PL or to NOWHERE (no requesters at all).  In
  328. PL the case of NOWHERE, all requesters act as
  329. PL if the user pressed cancel on them.
  330. ED
  331.  
  332.  
  333. |thecurrentdirectory|
  334. WT {PathName}=TheCurrentDirectory
  335. PL This returns the pathname of the deck's
  336. PL current directory.
  337. PL
  338. PT SEE ALSO: 
  339. BS SetCurrentDirectory
  340. PL  and 
  341. PT           
  342. BS TheOriginDirectory
  343. PT .
  344. ED
  345.  
  346. |theorigindirectory|
  347. WT {PathName}=TheOriginDirectory
  348. PL This returns the pathname of the deck's
  349. PL original, startup, directory.  See the
  350. PL manual for a full description of this
  351. PL system variable.
  352. PL
  353. PT SEE ALSO: 
  354. BS TheCurrentDirectory
  355. PT .
  356. ED
  357.